import {RequestWillFetchCallback} from "workbox-core";

interface IFetchInterceptorPlugin {
    requestWillFetch: RequestWillFetchCallback
}

/**
 * @author lihh
 * @description fetch 拦截器插件
 */
export const fetchInterceptorPlugin = (): IFetchInterceptorPlugin => ({
    requestWillFetch: async (params) => {
        console.log(params, "111");
        return params.request;
    }
});
